<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="HandheldFriendly" content="true" />
    <meta name="MobileOptimized" content="320" />
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" href="./css/jiazai.css">
    <link rel="stylesheet" type="text/css" href="css/animate.css"/>
    <link rel="stylesheet" type="text/css" href="css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/share.css"/>
    <title>主页</title>
</head>

<body style="background: #1e618a;">
    <div id='app'>

        <!-- 加载中动画 -->
        <div id='jiazai-ani' v-if='jiazai'>
            <div class="arc"></div>
            <h1><span>LOADING</span></h1>
        </div>
        <!-- 加载中动画 -->
       
        <div id="com-tit" class='dis-spa'>
        	<div class='cont'>
        		<p class='menu dis-start' @tap="_close();">
	        		<img src="img/back-white.svg" style="width: 22px;height: 22px;" />
        		</p>
        	</div>
        	<div>分享</div>
        	<div class='cont' style="opacity: 0;">1</div>
        </div>
        
        <div id="share-content">
        	
        	<div class="share-bg-wrap">
        		<div class="share-logo dis-cen">
        			<img src="img/invi-ava.png"/>
        		</div>	
        		<div class="dis-spa all-line">
        			<img src="img/invi-all-line.png"/>
        			<span>我的邀请码</span>
        			<img src="img/invi-all-line.png"/>
        		</div>
        		<p class='invi-code' v-text='sharecode'>-----</p>
        		<p class='copy' @tap="_copy(sharecode);_toast('复制成功')">复制</p>
        		<div class="middle-line dis-spa">
        			<p>邀请好友来体验吧，快捷的赚钱方式</p>
					<img src="img/invi-line.png"/>
        		</div>
        		<div class="dis-spa share-qr">
        			<div class="" id='qr'>
        				
        			</div>
        			<p>AI矿池</p>
        		</div>
        		<div class="share-notice">
        			截图分享到微信好友或朋友圈，邀请好友下载APP
        		</div>
        	</div>
        </div>
        
    </div>
    <script src="js/comm.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/jquery.qrcode.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
        var app = new Vue({
            el: '#app',
            data: {
                //加载动画
                jiazai: false,
                //分享code
                sharecode:'------'
            },
            mounted:function(){
				var This=this;
            	this.$nextTick(function(){
					This.init();
            	});
            },
            methods: {
            	init:function(){
            		var This=this;
	        		This.jiazai=true;
	        		HTTP.post(MASKQR,{
	        		},function(data){
	        			This.jiazai=false;
	        			if(String(data.status)=='1'){
	        				var ai=localStorage.getItem('ai_user');
				          	if(ai){
				          		var json=JSON.parse(ai);
				          		This.sharecode=json.invitation;
				          	}
				          	mui.plusReady(function(){
				          		 var url=data.dowm.androiddownload;
				          		 if (plus.os.name.toLowerCase() == "ios") {
				          		 	url=data.dowm.iosdownload;
				          		 }
				          		 $("#qr").qrcode({ //设置css
									render: "table", //二维码的生成方式
									width: 100, //生成二维码的宽度
									height:100, //生成二维码的高度
									text: url, //解析成二维码的连接
									foreground: "#1D618A",
									background: "#fff",
								    correctLevel :1 //容错级别，默认为2，最高为3，为了让用户扫码最快，容错级别应当设为最低
								});
				          	});
	        			}else{
	        				setTimeout(function(){
	        					_close();
	        				},1200);
	        			}
					});
            	}
            }
        });
       
    </script>
</body>

</html>